import os

output_file = 'output.md'

# 打开输出文件并以 UTF-8 格式写入内容
with open(output_file, 'w', encoding='utf-8') as out_file:
    # 遍历当前目录下所有 .md 文件
    for file in os.listdir('.'):
        if file.endswith('.md') and file!='output.md':
            # 打开文件并读取内容
            with open(file, 'r', encoding='utf-8') as in_file:
                content = in_file.read()
                print(file)
                # 将内容写入输出文件中
                out_file.write(content+'\n')
